package com.oilsoft.scm.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.flex.remoting.RemotingDestination;
import org.springframework.flex.remoting.RemotingInclude;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.oilsoft.scm.dao.user.RoleDAO;
import com.oilsoft.scm.domain.Role;
@Service("roleService")
@RemotingDestination(channels = {"my-amf"})
public class RoleServiceImpl implements RoleService {

	@Autowired
	private RoleDAO roleDAO;
	
	@Override
	@RemotingInclude
	@Transactional
	public Role saveRole(Role role) {
		
		Role r = roleDAO.merge(role);
		return r;
	}

}
